import datetime

def ret_bool(ret:int):
	if ret >= 50:
		return True
	else:
		return False

def ret_int(a,b):
	return a*b

def ret_str(text,text2):
	return text + "==++++++++++\
	++++++++==" + text2

def ret_list(text):
	a = []
	for s in text:
		a.append(s)
	return a

def ret_dict():
	return dict(TIMI=2,MINI=4,MARK=6)

def ret_msg():
	return "this is a message!!!"

def log_save(text):
	log_t = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
	with open("log.txt","a+") as file:
		file.write(log_t + " " + text + "\n")
		file.close()

def command(product_name,work,tmp):
	return f"^XA^LH0,0^LL180^PW660^MD30\
		    ^CW1,E:SIMSUN.TTF\
		    ^SEE:GB18030.DAT^CI26\
		    ^FO50,5^GB500,170,4^FS\
		    ^FO70,35^A1N,30,30^FDProduct:{product_name}^FS\
		    ^FO70,75^A1N,30,30^FDWorking:{work}^FS\
		    ^FO70,115^A1N,30,30^FDNumber:{tmp}^FS\
		    ^FX 二维码\
		    ^FO400,20^BQ,2,5^CI26^FH^FDQA^FD{product_name}, {work}, {tmp}^FS\
		    ^XZ"